VPMU/AMD: check MSR values before writing to hardware
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 9 Jul 2015 11:55:32 +0000 (13:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jul 2015 11:55:32 +0000 (13:55 +0200)
commit5837e1ec98c2cb8d88b28cfe18a1b775f18a4779
tree84318633c0aa4caa4a64cf59c96cdb16c578196c
parent00f4e7bf91aa8e79076f100765a979b4f67e7e08
VPMU/AMD: check MSR values before writing to hardware

A number of fields of PMU control MSRs are defined as Reserved. AMD
documentation requires that such fields are preserved when the register
is written by software.

Add checks to amd_vpmu_do_wrmsr() to make sure that guests don't attempt
to modify those bits.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
xen/arch/x86/hvm/svm/vpmu.c